﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="7.6.aspx.cs" Inherits="_7_6" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Button ID="BtnAdd" runat="server" Text="添加" OnClick="BtnAdd_Click" />
            <asp:GridView ID="GVData" runat="server" AutoGenerateColumns="False" OnRowDeleting="GVData_RowDeleting" DataKeyNames="ProductId" OnRowCancelingEdit="GVData_RowCancelingEdit" OnRowEditing="GVData_RowEditing" OnRowUpdating="GVData_RowUpdating">
                <Columns>
                    <asp:BoundField DataField="ProductId" HeaderText="编号" ReadOnly="True" />
                    <asp:BoundField DataField="Name" HeaderText="商品名" />
                    <asp:BoundField DataField="ListPrice" DataFormatString="{0:C}" HeaderText="商品价格" />
                    <asp:BoundField DataField="Descn" HeaderText="描述" />
                    <asp:BoundField DataField="Qty" HeaderText="库存" />
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                </Columns>
            </asp:GridView>
        </div>
    </form>
</body>
</html>
